<html lang="zh" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorate="~{fragments/layout}">
<head th:include="/admin/common/header :: commonHead"></head>
<link rel="stylesheet" type="text/css" th:href="@{/static/admin/lib/ueditor/themes/default/css/ueditor.css}"/>

<body>
<input type="hidden" id="delUrl" value="/api/deleteArticle">
<input type="hidden" id="aoeUrl" value="/api/addOrEditArticle">
<input type="hidden" id="model" value="article">

<script type="text/html" id="titleTpl">
    <a class="layui-table-link" onclick="$.article.toDetail('{{d.id}}')">{{d.title}}</a>
</script>

<div class="formBox">
    <form id="addForm" class="layui-form">
        <input type="hidden" name="id">
        <div class="layui-form-item">
            <label class="layui-form-label">文章分类：</label>
            <div class="layui-input-block">
                <select name="categoryId" lay-verify="required" lay-search="">
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">文章标题：</label>
            <div class="layui-input-block">
                <input type="text" name="title" lay-verify="required" placeholder="请输入文章标题" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">是否置顶：</label>
            <div class="layui-input-block">
                <input type="radio" name="isTop" value="1" title="是">
                <input type="radio" name="isTop" value="0" title="否">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">文章简介：</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入内容" class="layui-textarea" name="summary"></textarea>
            </div>
        </div>
    </form>
</div>

<div class="contentBox">
    <form class="layui-form column-content-detail">
        <!--<div class="layui-form-item">
            <label class="layui-form-label">图像上传：</label>
            <div class="layui-input-block">
                <input type="file" name="file" id="image_upload">
            </div>
        </div>-->
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">文章内容：</label>
            <div class="layui-input-block">
                <script id="editor" name="content" type="text/plain"></script>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">文章来源：</label>
            <div class="layui-input-block">
                <input type="text" name="source" id="source" required lay-verify="required" placeholder="请输入文章来源"
                       autocomplete="off" class="layui-input">
            </div>
        </div>
    </form>
</div>


</body>
<html th:include="/admin/common/footer :: commonFoot"></html>
<script type="text/javascript" charset="utf-8" th:src="@{/static/admin/lib/ueditor/ueditor.config.js}"></script>
<script type="text/javascript" charset="utf-8" th:src="@{/static/admin/lib/ueditor/ueditor.all.js}"></script>
<script type="text/javascript">
    layui.config({
        base:path+'/static/admin/js/' //你的模块目录
    }).use('article'); //加载入口
</script>
</html>